package caiziyou.com.designpattern.factory.simple.pizzastore;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * 静态工厂模式
 * 
 * @author Administrator
 *
 */
public class OrderPizza2 {

	Pizza pizza = null;

	public OrderPizza2() {
		do {
			SimpleFactory.createPizza1(getType());
		} while (true);
	}

	public String getType() {

		BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
		try {
			System.out.println("input pizza type:");
			return bufferedReader.readLine();
		} catch (IOException e) {

			return "";
		}
	}
}
